home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
-
- # debugging output
- # set -x
-
- # global variables used in the script
- progname="startshowcase"
- usage="Usage: $progname <showcase arguments>"
-
- showcase=/usr/sbin/showcase
- psrip=/usr/lib/print/psrip
- psprolog=/usr/lib/print/data/PSRIPprolog
- gs1=/usr/bin/X11/gs
- gs2=/usr/freeware/bin/gs
-
- starterr="xconfirm -header Showcase -t Error:"
- enderr="-icon error -B Ok"
-
- # make sure showcase exists
- if [ ! -x $showcase ]; then
- $starterr -t "Showcase not found." \
- $enderr
- exit 1
- fi
-
- # make sure gs or psrip exists
- if [ -x $psrip -a -r $psprolog ]; then
- answer=Yes
- else
- if [ -x $gs1 ]; then
- answer=Yes
- elif [ -x $gs2 ]; then
- answer=Yes
- else
- answer=`xconfirm -header Showcase -t Warning: \
- -t " " \
- -t "Neither Ghostscript nor Impressario psrip was" \
- -t "found. One of these must be installed to allow" \
- -t "the conversion of Showcase files to GIF files." \
- -t " " \
- -t "You can still use Showcase, but the Showcase" \
- -t "documents will not be incorporated into your" \
- -t "HTML document." \
- -t " " \
- -t "Would you like to start Showcase anyway?" \
- -icon warning -b "Yes" -B "No"`
- fi
- fi
-
- if [ $answer = Yes ]; then
- # convert from showcase to postscript
- showcase $@
- fi
-
- exit $status
-
-